<template>
  <div class="page">
    <el-tabs ref="electronicManage" v-model="activeName" class="ledger-content" type="card">
      <el-tab-pane v-if="$hasTabPermission(50301)" label="电子围栏" name="electronic">
        <electronic ref="electronic" />
      </el-tab-pane>
      <el-tab-pane v-if="$hasTabPermission(50302)" label="预设电子围栏" name="presupposeFence">
        <presupposeFence ref="presupposeFence" />
      </el-tab-pane>
      <el-tab-pane v-if="$hasTabPermission(50303)" label="启用围栏" name="enableFence">
        <enableFence ref="enableFence" />
      </el-tab-pane>
      <el-tab-pane v-if="$hasTabPermission(50304)" label="正式围栏单量" name="fenceFormal">
        <fenceFormal ref="fenceFormal" />
      </el-tab-pane>
      <el-tab-pane v-if="$hasTabPermission(50305)" label="预设围栏单量" name="fencePre">
        <fencePre ref="fencePre" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

  <script>
  import { } from '@/api'
  import { } from '@/utils/mergeAsyncFunc'
  import electronic from '../electronic'
  import presupposeFence from '../presupposeFence'
  import enableFence from '../fenceUnit/enableFence'
  import fenceFormal from '../fenceUnit/components/fenceFormal'
  import fencePre from '../fenceUnit/components/fencePre'
  export default {
    name: 'electronicManage',
    components: {
      electronic,
      presupposeFence,
      enableFence,
      fenceFormal,
      fencePre
    },
    data() {
      return {
        activeName: 'electronic',
        storeMap: [],
        stockOutTypeMap: [],
        stockInTypeMap: []

      }
    },
    async created() {
    //   this.queryOptionsMap()
    },
    mounted() {
      this.activeName = this.$refs.electronicManage.panes.length > 0 ? this.$refs.electronicManage.panes[0].name : ''
    },
    methods: {
    //   async queryOptionsMap() {
    //     const [res, res1, res2] = await Promise.all([
    //       partsStoreHouseSelectList(),
    //       mergeAsyncFunc(queryMap, { enumName: 'PartsStockOutType' }),
    //       mergeAsyncFunc(queryMap, { enumName: 'PartsStockInType' })
    //       //   mergeAsyncFunc(queryMap, { enumName: 'StockTransPlanStatusEnum' })
    //     ])
    //     this.storeMap = res.data // 仓库
    //     this.stockOutTypeMap = res1.data // 出库类型
    //     this.stockInTypeMap = res2.data // 入库类型
    //   }
    }
  }
  </script>

<style lang="scss" scoped>
.page {
  height: 100%;
  .ledger-content {
    height: calc(100% - 10px);
    /deep/ .el-tabs__content {
      height: calc(100% - 50px);
    }
    /deep/ .el-tab-pane {
      height: 100%;
    }
  }
}
</style>
